<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page contentType="text/html;charset=utf-8" isELIgnored="false" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>文档列表 - 光年(Light Year Admin)后台管理系统模板</title>
    <link rel="icon" href="${base}/favicon.ico" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="${base}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${base}/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="${base}/css/style.min.css" rel="stylesheet">
    <link href="${base}/css/animate.css" rel="stylesheet">
</head>

<body>
<div class="container-fluid">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <label style="font-size: 30px">点赞过的帖子</label>
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>状态</th>
                                <th>类型</th>
                                <th>标题</th>
                                <th>内容</th>
                                <th>点击量</th>
                                <th>点赞数</th>
                                <th>评论条数</th>
                                <th>发布时间</th>
                                <th>发帖人</th>
                            </tr>
                            </thead>
                            <tbody>
                            <c:forEach var="p" items="${p.list}">
                                <tr>
                                    <td>
                                        <c:if test="${p.top==1}">
                                            <span class="mdi mdi-arrow-up-box"></span>
                                        </c:if>
                                        <c:if test="${p.good==1}">
                                            <span class="mdi mdi-diamond"></span>
                                        </c:if>
                                    </td>
                                    <td>${p.pt.type}</td>
                                    <td>${p.title}</td>
                                    <td>
                                        <a style="color:black;" class="btn btn-xs btn-default" title="看帖子" href="${base}/post/lookPost?id=${p.id}" data-toggle="tooltip" target="midView">
                                            <c:if test="${fn:length(p.content)>20}">
                                                ${fn:substring(p.content,0,20)}...
                                            </c:if>
                                            <c:if test="${fn:length(p.content)<=20}">
                                                ${p.content}
                                            </c:if>
                                        </a>
                                    </td>
                                    <td>${p.click}</td>
                                    <td>${p.support}</td>
                                    <td>${p.comments}</td>
                                    <td><fmt:formatDate value="${p.time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                                    <td>${p.user.name}</td>
                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>
                    </div>
                    <ul class="pagination">
                        <li><span><a href="${base}/post/supportPost?pageNum=${p.prePage}">«</a></span></li>
                        <c:forEach var="i" items="${p.navigatepageNums}">
                            <li <c:if test="${i eq p.pageNum}">class="active"</c:if>>
                                <a href="${base}/post/supportPost?pageNum=${i}">${i}</a>
                            </li>
                        </c:forEach>
                        <li><span><a href="${base}/post/supportPost?pageNum=${p.nextPage}">»</a></span></li>
                    </ul>
                </div>
            </div>
        </div>

    </div>

</div>

<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${base}/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="${base}/js/main.min.js"></script>

<!--消息提示-->
<script  src="${base}/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="${base}/js/lightyear.js"></script>
<script type="text/javascript" src="${base}/js/main.min.js"></script>

<script type="text/javascript">

</script>
</body>
</html>